<?php

use yii\helpers\Html;
use yii\widgets\ActiveForm;

/* @var $this yii\web\View */
/* @var $menuList array */
/* @var $model yak\layui\search\MenuSearch */
/* @var $form yii\widgets\ActiveForm */
?>

<div class="menu-search">

    <?php $form = ActiveForm::begin([
        'action' => ['index'],
        'method' => 'get',
        'fieldClass' => 'yak\layui\widgets\form\SearchActiveField',
        'options' => [
            'class' => 'layui-form layui-form-pane yak-form-search',
            'lay-filter' => 'sys-menu-list-search'
        ],
        'enableClientScript' => false
    ]); ?>

    <div class="layui-form-group layui-form-item">

        <?= \yak\layui\widgets\search\DropDownSearch::widget([
            'model' => $model, 'items' => ['title']
        ]) ?>

        <?= $form->field($model, 'pid')->dropDownList($menuList, ['prompt' => '--选择菜单--', 'lay-search' => true]) ?>

        <div class="layui-inline">
            <?= Html::submitButton('<i class="layui-icon layui-icon-search"></i> 查询', [
                'class' => 'layui-btn layui-btn-normal btn yak-search-btn', 'lay-submit' => true
            ]) ?>
            <?= Html::button('导出Excel', [
                'class' => 'layui-btn layui-btn-normal btn yak-search-btn',
                'yak-event' => 'submit-by-iframe', 'yak-property' => 'yak_output_excel'
            ]) ?>
        </div>

    </div>


    <?php ActiveForm::end(); ?>

</div>
